# $Id$
# Maintainer:  Jan de Groot <jgc@archlinux.org>
# Maintainer:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=guile
pkgver=2.2.2
pkgrel=1
pkgdesc='Portable, embeddable Scheme implementation written in C'
url='https://www.gnu.org/software/guile/'
arch=(i686 x86_64)
license=(GPL)
depends=(gmp libltdl ncurses texinfo libunistring gc libffi)
source=(https://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.gz{,.sig})
validpgpkeys=('3CE464558A84FDC69DB40CFB090B11993D9AEBB5' # Ludovic Courtès <ludo@gnu.org>
              'FF478FB264DE32EC296725A3DDC0F5358812F8F2') # Andy Wingo
sha256sums=('3d9b94183b19f04dd4317da87beedafd1c947142f3d861ca1f0224e7a75127ee'
            'SKIP')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr \
    --disable-static  \
    --disable-error-on-warning
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
  rm "$pkgdir"/usr/lib/libguile-2.?.so.*-gdb.scm
}
